/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exatrez.quartz;

import com.google.inject.Inject;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import exatrez.manager.EmailManager;

/**
 *
 * @author fikri
 */
public class CronAckEmailJob implements StatefulJob {
    
    @Inject
    private EmailManager manager;
    
    private static Logger LOGGER = LoggerFactory.getLogger(CronAckEmailJob.class);
    
    @Override
    public void execute(JobExecutionContext jec) throws JobExecutionException {
        
       LOGGER.debug("execute : start");
       manager.ackEmailProcess();  
       manager.beforeAfterDueDate();
       manager.closeObservation();
    }
}
